import { pubRequire } from '@utils/public'
const baseUrl = '/dataview/basic-data'
/*昨日数据 */
export function getTopData(callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/yesterday`, '', callbBack, errBack)
}
/*用户来源占比-图表 */
export function getSourceList(obj, callbBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/user/source-chart`,
    obj,
    callbBack,
    errBack
  )
}
/*用户来源占比-列表 */
export function getSourceTable(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/user/source`, obj, callbBack, errBack)
}
//用户来源-导出
export function exportSource() {
  return `${baseUrl}/user/source/export`
}
/*用户使用频道占比-图表 */
export function getChannelList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/channel-chart`, obj, callbBack, errBack)
}
/*用户使用频道占比-列表 */
export function getChannelTable(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/channel`, obj, callbBack, errBack)
}
//用户使用频道-导出
export function exportChannel() {
  return `${baseUrl}/channel/export`
}
/*功能入口-图表 */
export function getEnterList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/function-chart`, obj, callbBack, errBack)
}
/*功能入口-列表 */
export function getEnterTable(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/function`, obj, callbBack, errBack)
}
//功能入口-导出
export function exportEnter() {
  return `${baseUrl}/function/export`
}
